﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="ManterGrupoDeImagens.aspx.cs" Inherits="ManterGrupoDeImagens" Title="Manter Grupo de Imagens" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    
    <div class="demoheading" style="width:400px">Manter Grupo de Imagens</div>
     <div class="collapsePanelHeader" style="width: 400px; height: 15px">Consultar Grupos de Imagens</div>
      <div style="width:400">
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                    AutoGenerateColumns="False" DataSourceID="odsGrupoDeImagens">
                    <Columns>
                        <asp:BoundField DataField="Codigo" HeaderText="Codigo" 
                            SortExpression="Codigo" />
                        <asp:BoundField DataField="Nome" HeaderText="Nome" SortExpression="Nome" />
                        <asp:BoundField DataField="Descricao" HeaderText="Descricao" 
                            SortExpression="Descricao" />
                        <asp:BoundField DataField="Usuario" HeaderText="Usuario" 
                            SortExpression="Usuario" />
                        <asp:CheckBoxField DataField="Compartilhado" 
                            HeaderText="Compartilhado" SortExpression="Compartilhado" />
                        <asp:TemplateField HeaderText="Atualiza e Remove">
                            <ItemTemplate>
                                <asp:LinkButton ID="lbAtualiza" runat="server" onclick="lbAtualiza_Click1">Atualiza</asp:LinkButton>
                                &nbsp;&nbsp;
                                <asp:LinkButton ID="lbRemove" runat="server" onclick="lbRemove_Click">Remove</asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div> 

    <asp:ObjectDataSource ID="odsGrupoDeImagens" runat="server" 
        DataObjectTypeName="Negocios.GrupoDeImagens" DeleteMethod="Remove" 
        InsertMethod="Atualiza" OldValuesParameterFormatString="original_{0}" 
        SelectMethod="ConsultaTodos" TypeName="Negocios.GrupoDeImagensBLL"></asp:ObjectDataSource>

    <br />
    <div style="width:400">
        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
          <ContentTemplate>           
            <div class="collapsePanelHeader" style="width: 400px; height: 15px"></div>
                <table class="divDados" style="width: 400px">
                    <tr class="divOID">
                        <td style="width: 125px">
                            <asp:Label ID="lcodigo" runat="server" Text="Código"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="tbcodigo" runat="server" Enabled="False"></asp:TextBox>
                            &nbsp;&nbsp;
                            <asp:Button ID="btNovo" runat="server" Text="Novo" onclick="Bnovo_Click" />
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 125px">
                            <asp:Label ID="lnome" runat="server" Text="Nome"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="tbnome" runat="server" Enabled="False" MaxLength="30"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 125px">
                            <asp:Label ID="ldescricao" runat="server" Text="Descrição"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="tbdescricao" runat="server" Enabled="False" 
                                TextMode="MultiLine"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 125px">
                            <asp:Label ID="lcompartilha" runat="server" Text="Compartilhado"></asp:Label>
                        </td>
                        <td>
                            <asp:CheckBox ID="cbCompartilhado" runat="server" Text="Compartilhado" />
                        </td>
                    </tr>
                    <tr>
                        <td align="center" colspan="2">
                            <asp:Button ID="btGravar" runat="server" Text="Gravar" Enabled="False" 
                                onclick="btGravar_Click" Width="55px" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:Button ID="btCancelar" runat="server" Text="Cancelar" Enabled="False" 
                                onclick="btCancelar_Click" />
                        </td>
                    </tr>
                </table>
              <br />
              <asp:Label ID="lbErro" runat="server" CssClass="erro"></asp:Label>
              <br />
           </ContentTemplate>
        </asp:UpdatePanel>
    </div> 
</asp:Content>

